#ifndef __MESSAGE_SHOW__
#define __MESSAGE_SHOW__

#include <stdio.h>
#include <vector>
#include <stdlib.h>

#ifdef _AS_DLL

static bool show_message( const char * fmt, ... )
{
	if( !fmt ) return false;
	va_list al;
	va_start( al, fmt);
	int ch = vsnprintf( 0, 0, fmt, al );
	if( ch < 0 ) return false; ++ ch;
	std::vector<char> _buffer( ch );
	ch = vsnprintf( &_buffer[0], ch, fmt, al );
	if( ch < 0 ) return false;
	MessageBoxA( 0, &_buffer[0], "ALARM", 0 );
	return true;
}

#else

static bool show_message( const char * fmt, ... )
{
	if( !fmt ) return false;
	va_list al;
	va_start( al, fmt);
	vprintf( fmt, al );
	return true;
}


#endif


#endif